/**  
 * Copyright © 2018pactera. All rights reserved.
 *
 * @Title: ResultInfo.java
 * @Prject: management_system-gm
 * @Package: com.pactera.pmo.utils
 * @Description: TODO
 * @author: P0114720  
 * @date: 2018年3月13日 下午2:26:09
 * @version: V1.0  
 */
package com.bootmy.config;

import java.io.Serializable;

/**
 * @ClassName: ResultInfo
 * @Description: TODO
 * @author: P0114720
 * @date: 2018年3月13日 下午2:26:09
 */
public class ResultInfo implements Serializable{
	
	
	/**
	 * @fieldName: serialVersionUID
	 * @fieldType: long
	 * @Description: TODO
	 */
	private static final long serialVersionUID = 1L;

	public enum CODE { // code 枚举
		// 添加枚举的指定常量
		SUCCESS(0), //成功
		FAILURE(1), //失败
		
		RQUEST_SUCCESS(10000); //请求成功

		// 必须增加一个构造函数,变量,得到该变量的值
		private int code = 0;

		private CODE(int code) {
			this.code = code;
		}

		/**
		 * @return 枚举变量实际返回值
		 */
		public int getCode() {
			return code;
		}
	}

	private int code;
	
	private String message;
	
	private Object data;
	
	public ResultInfo() {
		super();
	}

	public ResultInfo(int code) {
		this.code = code;
	}
	public ResultInfo(int code, String message) {
		this.code = code;
		this.message = message;
	}
	public ResultInfo(int code, String message, Object data) {
		this.code = code;
		this.message = message;
		this.data = data;
	}
	/**
	 * @return the code
	 */
	public int getCode() {
		return code;
	}

	/**
	 * @param code the code to set
	 */
	public void setCode(int code) {
		this.code = code;
	}
	

	/**
	 * @return the message
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * @param message the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}

	/**
	 * @return the data
	 */
	public Object getData() {
		return data;
	}

	/**
	 * @param data the data to set
	 */
	public void setData(Object data) {
		this.data = data;
	}
	
	
	

}
